The getSymbol method returns order's symbol.
var getSymbol();
This method returns symbol as a string value.
The following example demonstrates the use of getSymbol() method.
function start()
{
//retrieve account's open orders
var account = getAccount();
var openOrders = account.getOrders();
//loop through all orders
for(var i = 0; i < openOrders.length, i++)
{
var order = openOrders[i];
//only process orders which match current symbol
if(order.getSymbol() == this.getSymbol())
{
//proceed...
}
}
//proceed further...
}
Copyright © 2006-2009 ActiveTick LLC